using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 燃烧Buff数据
/// </summary>
[CreateAssetMenu(menuName = "创建ScriptableObject/BuffData/Burn")]
public class BurnData : BuffData
{
    [Header("燃烧效果设置")]
    [Tooltip("每次造成伤害的数值")]
    public long DamagePerTick = 10;
    
    [Tooltip("伤害间隔时间（秒）")]
    public float TickInterval = 1.0f;
    
    [Tooltip("伤害类型")]
    public DamageType DamageType = DamageType.Fire;
    
    [Tooltip("燃烧伤害")]
    public long Damage = 0;
    
    [Tooltip("延迟时间")]
    public float Dealy = 0.0f;
    
    [Tooltip("是否可以被净化")]
    public bool CanBeCleansed = true;
    
    [Tooltip("是否可以被免疫")]
    public bool CanBeImmune = true;

    private void OnValidate()
    {
        // 确保BuffType正确设置
        if (BuffType != BuffType.Burn)
        {
            BuffType = BuffType.Burn;
        }
        
        // 设置默认标签
        if (Tags == BuffTag.None)
        {
            Tags = BuffTag.Slow; // 燃烧效果通常有减速标签
        }
    }
}

/// <summary>
/// 伤害类型枚举
/// </summary>
public enum DamageType
{
    Physical,   // 物理伤害
    Magic,      // 魔法伤害
    Fire,       // 火焰伤害
    Ice,        // 冰霜伤害
    Poison,     // 毒素伤害
    Lightning,  // 闪电伤害
    True        // 真实伤害
}